package com.itheima.rocketmq.rocketmqdemo.order;

import java.util.ArrayList;
import java.util.List;

/**
 * @description:
 * @author: ycc
 * @time: 2021/3/24
 */
public class OrderStep {
    private long orderId;
    private String desc;

    @Override
    public String toString() {
        return "OrderStep{" +
                "orderId=" + orderId +
                ", desc='" + desc + '\'' +
                '}';
    }

    public long getOrderId() {
        return orderId;
    }

    public void setOrderId(long orderId) {
        this.orderId = orderId;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static List<OrderStep> buildOrder() {
        //标准 : 创建、付款、推送、完成
        //1L   : 创建、付款、推送、完成
        //2L   : 创建、付款
        //3L   : 创建、付款
        ArrayList<OrderStep> orderList = new ArrayList<>();
        OrderStep orderStep = new OrderStep();

        orderStep = new OrderStep();
        orderStep.setOrderId(11L);
        orderStep.setDesc("创建");
        orderList.add(orderStep);

        orderStep = new OrderStep();
        orderStep.setOrderId(22L);
        orderStep.setDesc("创建");
        orderList.add(orderStep);

        orderStep = new OrderStep();
        orderStep.setOrderId(33L);
        orderStep.setDesc("创建");
        orderList.add(orderStep);

        orderStep = new OrderStep();
        orderStep.setOrderId(11L);
        orderStep.setDesc("付款");
        orderList.add(orderStep);

        orderStep = new OrderStep();
        orderStep.setOrderId(22L);
        orderStep.setDesc("付款");
        orderList.add(orderStep);

        orderStep = new OrderStep();
        orderStep.setOrderId(33L);
        orderStep.setDesc("付款");
        orderList.add(orderStep);

        orderStep = new OrderStep();
        orderStep.setOrderId(11L);
        orderStep.setDesc("推送");
        orderList.add(orderStep);

        orderStep = new OrderStep();
        orderStep.setOrderId(11L);
        orderStep.setDesc("完成");
        orderList.add(orderStep);

        return orderList;
    }
}


